package cn.kgc.springcloud.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author: mosin
 * @version: v1.0  2022/6/8
 */
@Controller
@RequestMapping("dept")
public class DeptController {

    @ResponseBody
    @RequestMapping("dept1")
    public String test01(HttpServletRequest request){
        int serverPort = request.getServerPort();
        return "部门服务被调用,端口号是:"+serverPort;
    }
}
